package com.pxxy.entity;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;

/******************
 * @Author yejf
 * @Description TODO
 */
public class Teacher implements Serializable {

    private Integer id;

    private String name; //姓名

    private String mobilePhone; //手机号

    private Gender gender; //性别

    private LocalDate birth; //生日

    private String description; //介绍

    private String remark; //备注

    private LocalDateTime lastLoginTime; //最后登录时间

    private String avatarURL; //头像路径

    private String analysis; //分析评语

    private List<TeachRecord> recordList; //当前老师的上课记录

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Teacher{");
        sb.append("id=").append(id);
        sb.append(", name='").append(name).append('\'');
        sb.append(", mobilePhone='").append(mobilePhone).append('\'');
        sb.append(", gender=").append(gender);
        sb.append(", birth=").append(birth);
        sb.append(", description='").append(description).append('\'');
        sb.append(", remark='").append(remark).append('\'');
        sb.append(", lastLoginTime=").append(lastLoginTime);
        sb.append(", avatarURL='").append(avatarURL).append('\'');
        sb.append(", analysis='").append(analysis).append('\'');
        sb.append('}');
        return sb.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Teacher teacher = (Teacher) o;
        return Objects.equals(id, teacher.id) &&
                Objects.equals(name, teacher.name) &&
                Objects.equals(mobilePhone, teacher.mobilePhone);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, mobilePhone);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    public Gender getGender() {
        return gender;
    }

    public void setGender(Gender gender) {
        this.gender = gender;
    }

    public LocalDate getBirth() {
        return birth;
    }

    public void setBirth(LocalDate birth) {
        this.birth = birth;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public LocalDateTime getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(LocalDateTime lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public String getAvatarURL() {
        return avatarURL;
    }

    public void setAvatarURL(String avatarURL) {
        this.avatarURL = avatarURL;
    }

    public String getAnalysis() {
        return analysis;
    }

    public void setAnalysis(String analysis) {
        this.analysis = analysis;
    }

    public List<TeachRecord> getRecordList() {
        return recordList;
    }

    public void setRecordList(List<TeachRecord> recordList) {
        this.recordList = recordList;
    }
}
